const express = require('express');

const app = express();

app.use((res, req, next) => {
    console.log('common middleWare 01');
    next();
})  

app.get('/home', (req, res, next) => {
    console.log('home path and method middleWare01');
    next();
}, (req, res, next) => {
    console.log('home path and method middleWare02');
    next();
}, (req, res, next) => {
    console.log('home path and method middleWare03');
    next();
}, (req, res, next) => {
    console.log('home path and method middleWare04');
    res.end('home page');
})

app.listen(8000, () => {
    console.log('express服务器启动成功');
})